﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ESpilWebservicePrototype.ViewModels
{
    public class UserListItemViewModel
    {
        public int UserID { get; set; }
        public string Username { get; set; }
        public string Name { get; set; }
        public string Lastname { get; set; }

        public static UserListItemViewModel GetViewModelFrom(User user)
        {
            UserListItemViewModel userItem = new UserListItemViewModel();
            userItem.UserID = user.UserID;
            userItem.Username = user.Username;
            userItem.Name = user.Name;
            userItem.Lastname = user.Lastname;

            return userItem;
        }
    }
}